package com.trp.model;

import java.util.HashMap;
import java.util.Map;

import com.trp.model.psr.CircuitSection;

public class Substation extends CIMModel {

	private Map<String, CircuitSection> mIns;

	private Map<String, CircuitSection> mOuts;

	private double x;

	private double y;


	@Override
	protected void init() {
		mIns = new HashMap<String, CircuitSection>();

		mOuts = new HashMap<String, CircuitSection>();

		this.mType = CIMModel.Type.SUBSTATION;
	}

	public void addIns(CircuitSection cs) {
		if (cs == null || cs.getID() == null || cs.getID().isEmpty()) {
			throw new NullPointerException(" can not add null circuit section to substation!");
		}
		mIns.put(cs.getID(), cs);
	}

	public void addOuts(CircuitSection cs) {
		if (cs == null || cs.getID() == null || cs.getID().isEmpty()) {
			throw new NullPointerException(" can not add null circuit section to substation!");
		}
		mOuts.put(cs.getID(), cs);
	}


	public double getX() {
		return x;
	}

	public void setX(double x) {
		this.x = x;
	}

	public double getY() {
		return y;
	}

	public void setY(double y) {
		this.y = y;
	}

}
